//入口的js文件
import Vue from 'vue'
//导入APP根组件
import App from '../app.vue'
//导入mint-ui
//1.导入头部
import { Header } from 'mint-ui'
Vue.component('myhead', Header);
//2.导入轮播图
import {Swipe,SwipeItem,Button} from 'mint-ui'
Vue.component(Swipe.name,Swipe);
Vue.component(SwipeItem.name,SwipeItem);
Vue.component(Button.name,Button);
//导入MUI
import '../lib/mui/css/mui.min.css'
import '../lib/mui/css/icons-extra.css'

//1.1导入路由
import VueRouter from 'vue-router'
//1.2安装路由
Vue.use(VueRouter);
//1.3导入自己的router配置文件
import router from './router.js'

//2.1导入vue-resource
import VueResource from 'vue-resource'
//2.2安装vue-resource
Vue.use(VueResource);
//2.3设置请求的根路径
Vue.http.options.root='https://www.apiopen.top';
//2.3.1安装moment cnpm i moment -S,导入格式化时间的插件
import moment from 'moment'
//定义全局过滤器
Vue.filter('dateFormat',function (dataStr,pattern="YYYY-MM-DD hh:mm:ss") {
   return moment(dataStr).format(pattern)
})
//导入懒加载
import { Lazyload } from 'mint-ui';
Vue.use(Lazyload);


var vm=new Vue({
    el:"#app",
    render:c=>c(App),
    router//挂载对象在VM实例中

});